﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace ServerNodeLib
{
	/// <summary>
	/// Captures the result of executing a particular command.
	/// This is sent back to the server as part of the result.
	/// </summary>
	[DataContract()]
	public class CommandResult
	{
		/// <summary>
		/// The command that was executed.
		/// </summary>
		[DataMember()]
		public String Command;
		/// <summary>
		/// The arguments that accompanied the command.
		/// </summary>
		[DataMember()]
		public String Arguments;
		/// <summary>
		/// The time when the command began execution.
		/// </summary>
		[DataMember()]
		public DateTime StartTime;
		/// <summary>
		/// The time when the command finished execution
		/// </summary>
		[DataMember()]
		public DateTime EndTime;
		/// <summary>
		/// True if the command completed successfully.
		/// Successfully depends on the CommandInfo.
		/// 
		/// If an exception was thrown, the command failed.
		/// 
		/// If the command completed outside of the window,
		/// it failed only of that were an error.
		/// </summary>
		[DataMember()]
		public bool IsSuccess;
	}
}
